package com.xzy.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * 实例映射
 *
 * @author xzy.xiao
 * @date 2022/4/6  10:12
 */
@Component
@PropertySource(value = "classpath:database.properties")
@ConfigurationProperties(prefix = "db")
public class InstanceMapper {
    private String url;
    private String user;
    private String password;
    private Boolean autoReconnect;
    private Boolean useUnicode;
    private String characterEncoding;
    private String zeroDateTimeBehavior;
    private Boolean allowMultiQueries;

    @Override
    public String toString() {
        return "InstanceMapper{" +
                "url='" + url + '\'' +
                ", user='" + user + '\'' +
                ", password='" + password + '\'' +
                ", autoReconnect=" + autoReconnect +
                ", useUnicode=" + useUnicode +
                ", characterEncoding='" + characterEncoding + '\'' +
                ", zeroDateTimeBehavior='" + zeroDateTimeBehavior + '\'' +
                ", allowMultiQueries=" + allowMultiQueries +
                '}';
    }
}
